//构造函数 constructor
function Person(name, age) {
    //new 的方式来调用的话
    console.log(this);
    this.name = name;
    this.age = age;
}
//函数自带 原型链 prototype
Person.prototype.sayHi = function(){
console.log('hello');
}
Person.prototype.playBasketball = function(){
    console.log('打篮球');
}
// new 来调用
const wf =new Person("王飞", 18);
console.log(wf.name);
wf.sayHi();
